home *** CD-ROM | disk | FTP | other *** search
/ TOS Silver 2000 / TOS Silver 2000.iso / musik / MIDIFP21 / SOURCES / INCLUDE / MY_VDI.H < prev    next >
Encoding:
C/C++ Source or Header  |  1994-09-03  |  15.0 KB  |  398 lines

  1. /*      VDI.H
  2.  
  3.         GEM VDI Definitions
  4.  
  5.         Copyright (c) Borland International 1990
  6.         All Rights Reserved.
  7. */
  8.  
  9.  
  10. #if  !defined( __VDI__ )
  11. #define __VDI__
  12.  
  13.  
  14. typedef struct
  15. {
  16.     int    contrl[15];
  17.     int    intin[132];
  18.     int    intout[140];
  19.     int    ptsin[145];
  20.     int    ptsout[145];
  21. } VDIPARBLK;
  22.  
  23. typedef struct
  24. {
  25.     int    *contrl;
  26.     int    *intin;
  27.     int    *ptsin;
  28.     int    *intout;
  29.     int    *ptsout;
  30. } VDIPB;
  31.  
  32. extern  VDIPARBLK _VDIParBlk;
  33.  
  34. void vdi( VDIPB *vdipb );
  35.  
  36.  
  37. /****** Control definitions *********************************************/
  38.  
  39. #define RC 2               /* RC coordinate system, by Mad Harry */
  40. #define NDC 0              /* NDC coordinate system, by Mad Harry */
  41.  
  42. void    v_opnwk( int *work_in,  int *handle, int *work_out);
  43. void    v_clswk( int handle );
  44. void    v_opnvwk( int *work_in, int *handle, int *work_out);
  45. void    v_clsvwk( int handle );
  46. void    v_clrwk( int handle );
  47. void    v_updwk( int handle );
  48. int             vst_load_fonts( int handle, int select );
  49. void    vst_unload_fonts( int handle, int select );
  50. void    vs_clip( int handle, int clip_flag, int *pxyarray );
  51.  
  52.  
  53. /****** Output definitions **********************************************/
  54.  
  55. void    v_pline( int handle, int count, int *pxyarray );
  56. void    v_pmarker( int handle, int count, int *pxyarray );
  57. void    v_gtext( int handle, int x, int y, char *string );
  58. void    v_fillarea( int handle, int count, int *pxyarray );
  59. void    v_cellarray( int handle, int *pxyarray, int row_length,
  60.                      int el_used, int num_rows, int wrt_mode,
  61.                      int *colarray );
  62. void    v_contourfill( int handle, int x, int y, int index );
  63. void    vr_recfl( int handle, int *pxyarray );
  64. void    v_bar( int handle, int *pxyarray );
  65. void    v_arc( int handle, int x, int y, int radius,
  66.                int begang, int endang );
  67. void    v_pieslice( int handle, int x, int y, int radius,
  68.                     int begang, int endang );
  69. void    v_circle( int handle, int x, int y, int radius );
  70. void    v_ellarc( int handle, int x, int y, int xradius,
  71.                   int yradius, int begang, int endang );
  72. void    v_ellpie( int handle, int x, int y, int xradius,
  73.                   int yradius, int begang, int endang );
  74. void    v_ellipse( int handle, int x, int y, int xradius,
  75.                    int yradius  );
  76. void    v_rbox  ( int handle, int *pxyarray );
  77. void    v_rfbox ( int handle, int *pxyarray );
  78. void    v_justified( int handle,int x, int y, char *string,
  79.                      int length, int word_space,
  80.                      int char_space );
  81.  
  82.  
  83. /****** Attribute definitions *****************************************/
  84.  
  85. /* bit masks for vst_effects() */
  86.  
  87. #define NORMAL      0x00
  88. #define BOLD        0x01
  89. #define LIGHT       0x02
  90. #define ITALIC      0x04
  91. #define UNDERLINED  0x08
  92. #define HOLLOW      0x10
  93. #define SHADOWED    0x20
  94.  
  95. /* patterns for vsf_style() */
  96.  
  97. #define IP_HOLLOW       0
  98. #define IP_1PATT        1
  99. #define IP_2PATT        2
  100. #define IP_3PATT        3
  101. #define IP_4PATT        4
  102. #define IP_5PATT        5
  103. #define IP_6PATT        6
  104. #define IP_SOLID        7
  105.  
  106.  
  107. /* gsx modes for vswr_mode() */
  108.  
  109. #define MD_REPLACE      1
  110. #define MD_TRANS        2
  111. #define MD_XOR          3
  112. #define MD_ERASE        4
  113.  
  114.  
  115. /* gsx styles for vsf_interior() */
  116.  
  117. #define FIS_HOLLOW      0
  118. #define FIS_SOLID       1
  119. #define FIS_PATTERN     2
  120. #define FIS_HATCH       3
  121. #define FIS_USER        4
  122.  
  123.  
  124. /* bit blt rules for vro_cpyfm() and vrt_cpyfm() */
  125.  
  126. #define ALL_WHITE        0
  127. #define S_AND_D          1
  128. #define S_AND_NOTD       2
  129. #define S_ONLY           3
  130. #define NOTS_AND_D       4
  131. #define D_ONLY           5
  132. #define S_XOR_D          6
  133. #define S_OR_D           7
  134. #define NOT_SORD         8
  135. #define NOT_SXORD        9
  136. #define D_INVERT        10
  137. #define NOT_D           11
  138. #define S_OR_NOTD       12
  139. #define NOTS_OR_D       13
  140. #define NOT_SANDD       14
  141. #define ALL_BLACK       15
  142.  
  143.  
  144. /* linetypes for vsl_type() */
  145.  
  146. #define SOLID           1
  147. #define LONGDASH        2
  148. #define DOT             3
  149. #define DASHDOT         4
  150. #define DASH            5
  151. #define DASH2DOT        6
  152. #define USERLINE        7
  153.  
  154. /* line ends for vsl_ends() */
  155.  
  156. #define SQUARE          0
  157. #define ARROWED         1
  158. #define ROUND           2
  159.  
  160.  
  161. int     vswr_mode( int handle, int mode );
  162. void    vs_color( int handle, int index, int *rgb_in );
  163. int     vsl_type( int handle, int style );
  164. void    vsl_udsty( int handle, int pattern );
  165. int     vsl_width( int handle, int width );
  166. int     vsl_color( int handle, int color_index );
  167. void    vsl_ends( int handle, int beg_style, int end_style );
  168. int     vsm_type( int handle, int symbol );
  169. int     vsm_height( int handle, int height );
  170. int     vsm_color( int handle, int color_index );
  171. void    vst_height( int handle, int height, int *char_width,
  172.                     int *char_height, int *cell_width,
  173.                     int *cell_height );
  174. int     vst_point( int handle, int point, int *char_width,
  175.                     int *char_height, int *cell_width,
  176.                     int *cell_height );
  177. int     vst_rotation( int handle, int angle );
  178. int     vst_font( int handle, int font );
  179. int     vst_color( int handle, int color_index );
  180. int     vst_effects( int handle, int effect );
  181. void    vst_alignment( int handle, int hor_in, int vert_in,
  182.                        int *hor_out, int *vert_out );
  183. int     vsf_interior( int handle, int style );
  184. int     vsf_style( int handle, int style_index );
  185. int     vsf_color( int handle, int color_index );
  186. int     vsf_perimeter( int handle, int per_vis );
  187. void    vsf_udpat( int handle, int *pfill_pat, int planes );
  188.  
  189.  
  190. /****** Raster definitions *********************************************/
  191.  
  192. typedef struct
  193. {
  194.         void            *fd_addr;
  195.         int             fd_w;
  196.         int             fd_h;
  197.         int             fd_wdwidth;
  198.         int             fd_stand;
  199.         int             fd_nplanes;
  200.         int             fd_r1;
  201.         int             fd_r2;
  202.         int             fd_r3;
  203. } MFDB;
  204.  
  205. void    vro_cpyfm( int handle, int vr_mode, int *pxyarray,
  206.                    MFDB *psrcMFDB, MFDB *pdesMFDB );
  207. void    vrt_cpyfm( int handle, int vr_mode, int *pxyarray,
  208.                    MFDB *psrcMFDB, MFDB *pdesMFDB,
  209.                    int *color_index );
  210. void    vr_trnfm( int handle, MFDB *psrcMFDB, MFDB *pdesMFDB );
  211. void    v_get_pixel( int handle, int x, int y, int *pel,
  212.                      int *index );
  213.  
  214.  
  215. /****** Input definitions **********************************************/
  216.  
  217. void    vsin_mode( int handle, int dev_type, int mode );
  218. void    vrq_locator( int handle, int x, int y, int *xout,
  219.                      int *yout, int *term );
  220. int     vsm_locator( int handle, int x, int y, int *xout,
  221.                      int *yout, int *term );
  222. void    vrq_valuator( int handle, int valuator_in,
  223.                       int *valuator_out, int *terminator );
  224. void    vsm_valuator( int handle, int val_in, int *val_out,
  225.                       int *term, int *status );
  226. void    vrq_choice( int handle, int ch_in, int *ch_out );
  227. int     vsm_choice( int handle, int *choice );
  228. void    vrq_string( int handle, int max_length, int echo_mode,
  229.                     int *echo_xy, char *string );
  230. int     vsm_string( int handle, int max_length, int echo_mode,
  231.                     int *echo_xy, char *string );
  232. void    vsc_form( int handle, int *pcur_form );
  233. void    vex_timv( int handle, int (*tim_addr)(), int (**otim_addr)(),
  234.                   int *tim_conv );
  235. void    v_show_c( int handle, int reset );
  236. void    v_hide_c( int handle );
  237. void    vq_mouse( int handle, int *pstatus, int *x, int *y );
  238. void    vex_butv( int handle, int (*pusrcode)(), int (**psavcode)() );
  239. void    vex_motv( int handle, int (*pusrcode)(), int (**psavcode)() );
  240. void    vex_curv( int handle, int (*pusrcode)(), int (**psavcode)() );
  241. void    vq_key_s( int handle, int *pstatus );
  242.  
  243.  
  244. /****** Inquire definitions *******************************************/
  245.  
  246. void    vq_extnd( int handle, int owflag, int *work_out );
  247. int     vq_color( int handle, int color_index,
  248.                   int set_flag, int *rgb );
  249. void    vql_attributes( int handle, int *attrib );
  250. void    vqm_attributes( int handle, int *attrib );
  251. void    vqf_attributes( int handle, int *attrib );
  252. void    vqt_attributes( int handle, int *attrib );
  253. void    vqt_extent( int handle, char *string, int *extent );
  254. int     vqt_width( int handle, int character,
  255.                    int *cell_width, int *left_delta,
  256.                    int *right_delta );
  257. int     vqt_name( int handle, int element_num, char *name );
  258. void    vq_cellarray( int handle, int *pxyarray,
  259.                       int row_length, int num_rows,
  260.                       int *el_used, int *rows_used,
  261.                       int *status, int *colarray );
  262. void    vqin_mode( int handle, int dew_type, int *input_mode );
  263. void    vqt_fontinfo( int handle, int *minADE, int *maxADE,
  264.                       int *distances, int *maxwidth,
  265.                       int *effects );
  266.  
  267.  
  268. /****** Escape definitions *********************************************/
  269.  
  270. void    vq_chcells( int handle, int *rows, int *columns );
  271. void    v_exit_cur( int handle );
  272. void    v_enter_cur( int handle );
  273. void    v_curup( int handle );
  274. void    v_curdown( int handle );
  275. void    v_curright( int handle );
  276. void    v_curleft( int handle );
  277. void    v_curhome( int handle );
  278. void    v_eeos( int handle );
  279. void    v_eeol( int handle );
  280. void    vs_curaddress( int handle, int row, int column );
  281. void    v_curaddress( int handle, int row, int column );
  282. void    v_curtext( int handle, char *string );
  283. void    v_rvon( int handle );
  284. void    v_rvoff( int handle );
  285. void    vq_curaddress( int handle, int *row, int *column );
  286. int     vq_tabstatus( int handle );
  287. void    v_hardcopy( int handle );
  288. void    v_dspcur( int handle, int x, int y );
  289. void    v_rmcur( int handle );
  290. void    v_form_adv( int handle );
  291. void    v_output_window( int handle, int *xyarray );
  292. void    v_clear_disp_list( int handle );
  293. void    v_bit_image( int handle, const char *filename,
  294.                      int aspect, int x_scale, int y_scale,
  295.                      int h_align, int v_align, int *xyarray );
  296. void    vq_scan( int handle, int *g_slice, int *g_page,
  297.                  int *a_slice, int *a_page, int *div_fac);
  298. void    v_alpha_text( int handle, char *string );
  299. void    vs_palette( int handle, int palette );
  300. void    v_sound( int handle, int frequency, int duration );
  301. int        vs_mute( int handle, int action );
  302. void    vqp_films( int handle, char *film_names );
  303. void    vqp_state( int handle, int *port, char *film_name,
  304.                    int *lightness, int *interlace,
  305.                    int *planes, int *indexes );
  306. void    vsp_state( int handle, int port, int film_num,
  307.                    int lightness, int interlace, int planes,
  308.                    int *indexes );
  309. void    vsp_save( int handle );
  310. void    vsp_message( int handle );
  311. int     vqp_error( int handle );
  312. void    v_meta_extents( int handle, int min_x, int min_y,
  313.                         int max_x, int max_y );
  314. void    v_write_meta( int handle,
  315.                       int num_intin, int *intin,
  316.                       int num_ptsin, int *ptsin );
  317. void    vm_coords( int handle, int llx, int lly, int urx, int ury );
  318. void    vm_filename( int handle, const char *filename );
  319. void    vm_pagesize( int handle, int pgwidth, int pdheight );
  320. void    v_offset( int handle, int offset );
  321. void    v_fontinit( int handle, int fh_high, int fh_low );
  322. void    v_escape2000( int handle, int times );
  323.  
  324. void    vt_resolution( int handle, int xres, int yres,
  325.                        int *xset, int *yset );
  326. void    vt_axis( int handle, int xres, int yres,
  327.                  int *xset, int *yset );
  328. void    vt_origin( int handle, int xorigin, int yorigin );
  329. void    vq_tdimensions( int handle, int *xdimension, int *ydimension );
  330. void    vt_alignment( int handle, int dx, int dy );
  331. void    vsp_film( int handle, int index, int lightness );
  332. void    vsc_expose( int handle, int state );
  333.  
  334.  
  335. #define GDOS_NONE      -2L            /* no GDOS installed           */
  336. #define GDOS_FSM       0x5F46534DL    /* '_FSM' - FSMGDOS installed  */
  337. #define GDOS_FNT       0x5F464E54L    /* '_FNT' - FONTGDOS installed */
  338.  
  339. int     vq_gdos( void );
  340. long    vq_vgdos( void );
  341.  
  342. int     v_bez_on( int handle );
  343. void    v_bez_off( int handle );
  344. void    v_set_app_buff( int handle, void *address, int nparagraphs );
  345. void    v_bez( int handle, int count, int *xyarr,
  346.                 char *bezarr, int *extent, int *totpts, int *totmoves );
  347. void    v_bez_fill( int handle, int count, int *xyarr,
  348.                      char *bezarr, int *extent, int *totpts,
  349.                      int *totmoves );
  350. int     v_bez_qual( int handle, int prcnt, int *actual );
  351.  
  352.  
  353. /****** SpeedoGDOS definitions ********************************************/
  354.  
  355. typedef long  fix31;
  356.  
  357. void    vqt_f_extent( int handle, char *string, int *extent );
  358. void    v_ftext( int handle, int x, int y, char *string );
  359. void    v_ftext_offset( int handle, int x, int y, char *string, int *offset );
  360. void    v_killoutline( int handle, void *component );
  361. void    v_getoutline( int handle, int ch, int *xyarray,
  362.                       char *bezarray, int maxverts, int *numverts );
  363. void    vst_scratch( int handle, int mode );
  364. void    vst_error( int handle, int mode, int *errorvar );
  365. void    vqt_advance( int handle, int ch, int *advx, int *advy,
  366.                      int *remx, int *remy );
  367. void    vqt_advance32( int handle, int ch, fix31 *advx, fix31 *advy );
  368. int     vst_arbpt( int handle, int point, int *chwd, int *chht,
  369.                    int *cellwd, int *cellht );
  370. fix31   vst_arbpt32( int handle, fix31 point, int *chwd, int *chht,
  371.                      int *cellwd, int *cellht );
  372. void    vst_charmap( int handle, int mode );
  373. void    v_getbitmap_info( int handle, int ch, fix31 *advx, fix31 *advy,
  374.                           fix31 *xoff, fix31 *yoff, fix31 *width,
  375.                           fix31 *height );
  376. void    vqt_pairkern( int handle, int ch1, int ch2, fix31 *x, fix31 *y );
  377. void    vqt_trackkern( int handle, fix31 *x, fix31 *y );
  378. void    vqt_fontheader( int handle, char *buffer, char *pathname );
  379. void    vst_kern( int handle, int tmode, int pmode, int *tracks,
  380.                   int *pairs );
  381. fix31   vst_setsize32( int handle, fix31 point, int *chwd, int *chht,
  382.                        int *cellwd, int *cellht );
  383. void    vqt_devinfo( int handle, int devnum, int *devexits,
  384.                      char *devstr );
  385. int     v_flushcache( int handle );
  386. void    vqt_cachesize( int handle, int which_cache, long *size );
  387. void    vqt_get_table( int handle, int **map );
  388. int     v_loadcache( int handle, char *filename, int mode );
  389. int     v_savecache( int handle, char *filename );
  390. int     vst_setsize( int handle, int point, int *chwd, int *chht,
  391.                      int *cellwd, int *cellht );
  392. int     vst_skew( int handle, int skew );
  393.  
  394.  
  395. #endif
  396.  
  397. /***********************************************************************/
  398.